package com.clms.client.service.Impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clms.client.pojo.entity.CustomerIssues;
import com.clms.client.mapper.CustomerIssuesMapper;
import com.clms.client.pojo.vo.CustomerIssuesVo;
import com.clms.client.service.CustomerIssuesService;
import com.clms.common.R;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: clms-third
 * @description: 客服问答的业务逻辑层
 * @author: 赵露露
 * @create: 2021-07-23 10:05
 **/
@Service
public class CustomerIssuesServiceImpl implements CustomerIssuesService {
    @Autowired
    CustomerIssuesMapper customerIssuesMapper;



    @Override
    public R selectRelus(CustomerIssues customerIssues) {
        return null;
    }

    @Override
    public R selectPage(CustomerIssuesVo customerIssuesVo) {

        QueryWrapper<CustomerIssues> queryWrapper=new QueryWrapper<>();
        if(StringUtils.isNotEmpty(customerIssuesVo.getQuestion())){
            queryWrapper.like("question",customerIssuesVo.getQuestion());
        }
        return R.ok().put("allQuestion",customerIssuesVo);
    }


    /*@Override
    public R selectAll() {
        List<CustomerIssues> tbCustomerIssues=customerIssuesMapper.selectList(null);
        return R.ok().put("allcustomer",tbCustomerIssues);
    }*/


}
